package com.lizhen.j2eepattern.interceptingfilterpattern;

import com.lizhen.j2eepattern.interceptingfilterpattern.impl.AuthenticationFilter;
import com.lizhen.j2eepattern.interceptingfilterpattern.impl.DebugFilter;

public class InterceptingFilterPattern {
    public InterceptingFilterPattern() {
    }

    public static void main(String[] args) {
        FilterManager filterManager = new FilterManager(new Target());
        filterManager.setFilter(new AuthenticationFilter());
        filterManager.setFilter(new DebugFilter());
        Client client = new Client();
        client.setFilterManager(filterManager);
        client.sendRequest("HOME");
    }
}
